home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
TECHNICA
/
COMPUTER
/
H254.ZIP
/
IRITSM3S.ZIP
/
IRIT
/
SOLID1.IRT
< prev
next >
Wrap
Text File
|
1991-11-30
|
679b
|
38 lines
#
# This simple solid was taken from: Geometric Modeling,
# by Michael E. Mortenson page 440.
#
# Created by Gershon Elber, Jan 89
#
save_mat = view_mat;
view_mat = view_mat * scale(vector( 0.2, 0.2, 0.2 ));
A = BOX(vector( -1, -1, -2), 2, 2, 4);
B = BOX(vector(-0.5, -2, -1), 2, 4, 2);
C = BOX(vector( 0, -3, -0.5), 2, 6, 1);
D = A + B;
free(A);
free(B);
beep(1000, 100);
interact(list(D), false);
E = D - C;
free(C);
free(D);
beep(1000,100);
final = convex(E);
free(E);
interact(list(final), false);
num_polys = cpoly(final);
save("solid1", list(view_mat,final));
free(final);
dumplvl = 1;
num_polys;
view_mat = save_mat;